1. Field of the Invention
The present invention relates to the field of Web services and, more particularly, to automatically generating REST clients from REST resources.
2. Description of the Related Art
Many companies have begun exposing their Web services in a form of Representational State Transfer (REST) services. Each of the rest services is a URL addressed resource. Users can query these exposed resources through HTTP methods, such as GET and POST. REST calls return a response, which are often formatted in eXtensible Markup Language (XML).
One way to interact with the REST resource is to dynamically build a URL with URL parameters to query the exposed resource; an example of which is shown in FIG. 1 (Prior Art). Specifically, FIG. 1 shows a URL 110 that queries YAHOO!'s Geocoding API. The URL 110 includes a base URI portion 112 and a query portion 114. The query portion 114 can specify values 118 for parameters. The URI portion 112 identifies the REST resource. The URL 110 can cause a related Web service to return results 120. Standard Web browsers include features to be able to specify the URL 110 and to view results 120.
Obvious problems exist with accessing a Web service by entering a URL into a Web browser including: a user must have the technical knowledge to specify URL's and URL parameters, a user must know the URL of a REST resource, a user must know what parameters can be specified for the REST resource, a user must know a proper means for specifying parameter values. Another less obvious problem is that a typical Web browser can fail to support all REST methods, such as PUT, POST, and DELETE methods.
A way around these problems is to develop a REST client to interface with a set of one or more REST resources. At present developers must manually create code of a Web client. In order to create a REST client, a developer must look up details on the use of the Web service exposed as a REST resource, to read documentation concerning the service, and then to painstakingly create Web clients specifically designed to submit user input/commands to the Web service and designed to present service results within the client. Accordingly, designing a REST client consumes developer time, which incurs a cost.